package com.twu.biblioteca;

/**
 * Created with IntelliJ IDEA.
 * User: ysotirov
 * Date: 29/01/13
 * Time: 17:32
 * To change this template use File | Settings | File Templates.
 */
public class DisplayMembershipDetails extends Option {

    public DisplayMembershipDetails(IOInterface ioHndl, Biblioteca bibl) {
        super(ioHndl,bibl);
    }


    @Override
    public void executeOption() {
        if (this.biblioteca.activeMember.isLoggedIn()){
            ioHandler.queueMsg("Membership details:");
            ioHandler.queueMsg(this.biblioteca.activeMember.name);
            ioHandler.queueMsg(this.biblioteca.activeMember.email);
            ioHandler.queueMsg(this.biblioteca.activeMember.phone);
        }
        else
        {
            ioHandler.queueMsg("Please talk to a Librarian. Thank you.");
        }
        ioHandler.Print();

    }
}
